﻿<StatusBar x:Class="CmdletHelpEditor.UI.UserControls.Parts.StatusBarMain"
		   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		   xmlns:viewModel="clr-namespace:CmdletHelpEditor.API.ViewModel"
		   mc:Ignorable="d"
		   d:DataContext="{d:DesignInstance viewModel:MainWindowVM}">
	<StatusBar.Resources>
		<Style x:Key="StatusBarTextBlock" TargetType="{x:Type TextBlock}">
			<Setter Property="TextWrapping" Value="NoWrap"/>
			<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
		</Style>
		<Style x:Key="ImgStatus" TargetType="Image">
			<Setter Property="Source" Value="/Images/Statuses/bad_16x16.png"/>
			<Style.Triggers>
				<DataTrigger Binding="{Binding SelectedTab.ErrorInfo}" Value="{x:Null}">
					<Setter Property="Source" Value="/Images/Statuses/ok_16x16.png"/>
				</DataTrigger>
			</Style.Triggers>
		</Style>
	</StatusBar.Resources>
	<StatusBarItem>
		<TextBlock Style="{StaticResource ResourceKey=StatusBarTextBlock}"
				   Text="Module: ">
			<Run Text="{Binding SelectedTab.Module.Name}"
				 ToolTip="{Binding SelectedTab.Module.Name}"/>
		</TextBlock>
	</StatusBarItem>
	<Separator BorderBrush="#93B0D5" BorderThickness="1,0,0,0"/>
	<StatusBarItem>
		<TextBlock MinWidth="200"
				   MaxWidth="400"
				   Style="{StaticResource ResourceKey=StatusBarTextBlock}"
				   Text="{Binding SelectedModule.ProjectPath}"
				   ToolTip="{Binding SelectedModule.ProjectPath}"/>
	</StatusBarItem>
	<Separator BorderBrush="#93B0D5" BorderThickness="1,0,0,0"/>
	<StatusBarItem>
		<Image Width="16" Style="{StaticResource ImgStatus}" ToolTip="{Binding SelectedTab.ErrorInfo}"/>
	</StatusBarItem>
	<Separator BorderBrush="#93B0D5" BorderThickness="1,0,0,0"/>
	<StatusBarItem>
		<TextBlock Text="PowerShell host version: "><Run Text="{Binding PsVersion}"/></TextBlock>
	</StatusBarItem>
	<StatusBarItem>
		<ProgressBar Height="20" x:Name="pb" Width="100" Visibility="Collapsed"/>
	</StatusBarItem>
	<Separator/>
	<StatusBarItem>
		<TextBlock Text="Status: "><Run Text="{Binding SelectedTab.Module.ModuleStatus, Mode=OneWay}"/></TextBlock>
	</StatusBarItem>
</StatusBar>
